<?php 
$link=mysql_connect('localhost','root','123456') or die('impossibile collegarsi al server');

	mysql_select_db('chiedimelo') or die('impossibile collegarsi al server');


$result=mysql_query('SELECT * FROM domanda LIMIT 10');//$domande = DomandaQuery::create()->setLimit(25)->find()
while($sql=mysql_fetch_assoc($result, MYSQL_ASSOC))
{
?>
<?php //$query='UPDATE domanda SET voti=(voti+1) WHERE id=1'; 
	  //$result=mysql_fetch_assoc($query);   devo capire come cazzo farlo funzionare!!!
?>


<div class="question">
  <div class="interested_block" id="block_15648">
    <div class="interested_mark few_interests" id="mark_15648">
      <?php echo $sql['voti']?>   &nbsp;
    </div>

    <div class="interested_link"><a href="index.php?action=incrementa&domanda_id= ">interested?</a></div>
  </div>

  <h2><a href="http://www.askeet.com/question/free-casino">
  <?php echo $sql['titolo']?>
  </a></h2>
  <div class="subtitle">
  asked by <a href="http://www.askeet.com/user/carlhart">carlhart</a> on March 9, 2011 5:27 AM  </div>

  <div class="question_body">
  <?php echo $sql['testo'] ?>
    
    <div class="options">

          <a href="http://www.askeet.com/question/free-casino">answer it</a>    
    &nbsp;-&nbsp;

          tags: <a href="http://www.askeet.com/tag/free">free</a> + <a href="http://www.askeet.com/tag/casino">casino</a> + <a href="http://www.askeet.com/tag/no">no</a> + <a href="http://www.askeet.com/tag/deposit">deposit</a> + <a href="http://www.askeet.com/tag/bonus">bonus</a>    
    </div>

    <div class="options" id="report_question_15648">
      <a href="#" onclick="new Effect.BlindDown('login', {duration:0.5});; return false;">[report to moderator]</a>          </div>

  </div>
</div>
<?php }?>